Optimal. Leaf size=108 \[ -\frac {i d \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {d \tan (a+b x)}{2 b^2}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {(c+d x) \tan ^2(a+b x)}{2 b}+\frac {d x}{2 b}-\frac {i (c+d x)^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3720, 3473, 8, 3719, 2190, 2279, 2391} \[ -\frac {i d \text {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {d \tan (a+b x)}{2 b^2}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {(c+d x) \tan ^2(a+b x)}{2 b}+\frac {d x}{2 b}-\frac {i (c+d x)^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2190
Rule 2279
Rule 2391
Rule 3473
Rule 3719
Rule 3720
Rubi steps
\begin {align*} \int (c+d x) \tan ^3(a+b x) \, dx &=\frac {(c+d x) \tan ^2(a+b x)}{2 b}-\frac {d \int \tan ^2(a+b x) \, dx}{2 b}-\int (c+d x) \tan (a+b x) \, dx\\ &=-\frac {i (c+d x)^2}{2 d}-\frac {d \tan (a+b x)}{2 b^2}+\frac {(c+d x) \tan ^2(a+b x)}{2 b}+2 i \int \frac {e^{2 i (a+b x)} (c+d x)}{1+e^{2 i (a+b x)}} \, dx+\frac {d \int 1 \, dx}{2 b}\\ &=\frac {d x}{2 b}-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d \tan (a+b x)}{2 b^2}+\frac {(c+d x) \tan ^2(a+b x)}{2 b}-\frac {d \int \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b}\\ &=\frac {d x}{2 b}-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d \tan (a+b x)}{2 b^2}+\frac {(c+d x) \tan ^2(a+b x)}{2 b}+\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^2}\\ &=\frac {d x}{2 b}-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {i d \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {d \tan (a+b x)}{2 b^2}+\frac {(c+d x) \tan ^2(a+b x)}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 6.15, size = 240, normalized size = 2.22 \[ \frac {d \csc (a) \sec (a) \left (b^2 x^2 e^{-i \tan ^{-1}(\cot (a))}-\frac {\cot (a) \left (i \text {Li}_2\left (e^{2 i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )+i b x \left (-2 \tan ^{-1}(\cot (a))-\pi \right )-2 \left (b x-\tan ^{-1}(\cot (a))\right ) \log \left (1-e^{2 i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-2 \tan ^{-1}(\cot (a)) \log \left (\sin \left (b x-\tan ^{-1}(\cot (a))\right )\right )-\pi \log \left (1+e^{-2 i b x}\right )+\pi \log (\cos (b x))\right )}{\sqrt {\cot ^2(a)+1}}\right )}{2 b^2 \sqrt {\csc ^2(a) \left (\sin ^2(a)+\cos ^2(a)\right )}}-\frac {d \sec (a) \sin (b x) \sec (a+b x)}{2 b^2}+\frac {c \left (\tan ^2(a+b x)+2 \log (\cos (a+b x))\right )}{2 b}+\frac {d x \sec ^2(a+b x)}{2 b}-\frac {1}{2} d x^2 \tan (a) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 168, normalized size = 1.56 \[ \frac {2 \, b d x + 2 \, {\left (b d x + b c\right )} \tan \left (b x + a\right )^{2} + i \, d {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - i \, d {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \, {\left (b d x + b c\right )} \log \left (-\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (b d x + b c\right )} \log \left (-\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) - 2 \, d \tan \left (b x + a\right )}{4 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} \tan \left (b x + a\right )^{3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 183, normalized size = 1.69 \[ -\frac {i d \,x^{2}}{2}+i c x +\frac {2 b d x \,{\mathrm e}^{2 i \left (b x +a \right )}+2 b c \,{\mathrm e}^{2 i \left (b x +a \right )}-i d \,{\mathrm e}^{2 i \left (b x +a \right )}-i d}{b^{2} \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )^{2}}+\frac {c \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b}-\frac {2 c \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {2 i d a x}{b}-\frac {i d \,a^{2}}{b^{2}}+\frac {d \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) x}{b}-\frac {i d \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{2 b^{2}}+\frac {2 d a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.58, size = 519, normalized size = 4.81 \[ -\frac {b^{2} d x^{2} + 2 \, b^{2} c x - {\left (2 \, b d x + 2 \, b c + 2 \, {\left (b d x + b c\right )} \cos \left (4 \, b x + 4 \, a\right ) + 4 \, {\left (b d x + b c\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (2 i \, b d x + 2 i \, b c\right )} \sin \left (4 \, b x + 4 \, a\right ) + {\left (4 i \, b d x + 4 i \, b c\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + {\left (b^{2} d x^{2} + 2 \, b^{2} c x\right )} \cos \left (4 \, b x + 4 \, a\right ) + {\left (2 \, b^{2} d x^{2} + 4 i \, b c + {\left (4 \, b^{2} c + 4 i \, b d\right )} x + 2 \, d\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (d \cos \left (4 \, b x + 4 \, a\right ) + 2 \, d \cos \left (2 \, b x + 2 \, a\right ) + i \, d \sin \left (4 \, b x + 4 \, a\right ) + 2 i \, d \sin \left (2 \, b x + 2 \, a\right ) + d\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) - {\left (-i \, b d x - i \, b c + {\left (-i \, b d x - i \, b c\right )} \cos \left (4 \, b x + 4 \, a\right ) + {\left (-2 i \, b d x - 2 i \, b c\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b d x + b c\right )} \sin \left (4 \, b x + 4 \, a\right ) + 2 \, {\left (b d x + b c\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - {\left (-i \, b^{2} d x^{2} - 2 i \, b^{2} c x\right )} \sin \left (4 \, b x + 4 \, a\right ) - {\left (-2 i \, b^{2} d x^{2} + 4 \, b c - 4 \, {\left (i \, b^{2} c - b d\right )} x - 2 i \, d\right )} \sin \left (2 \, b x + 2 \, a\right ) + 2 \, d}{-2 i \, b^{2} \cos \left (4 \, b x + 4 \, a\right ) - 4 i \, b^{2} \cos \left (2 \, b x + 2 \, a\right ) + 2 \, b^{2} \sin \left (4 \, b x + 4 \, a\right ) + 4 \, b^{2} \sin \left (2 \, b x + 2 \, a\right ) - 2 i \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (a+b\,x\right )}^3\,\left (c+d\,x\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \tan ^{3}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________